<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="layout/blank"><!-- layout文件路径-->
<head>
    <title>新增分类</title>
</head>
<body>
<div layout:fragment="content">
    <div class="content-frame">
        <div class="row">
            <div class="col-md-12">
                <form class="form-horizontal" action="/category/save">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">分类管理</h3>
                            <ul class="panel-controls">
                                <li><a href="#" class="panel-remove"><span class="fa fa-times"></span></a></li>
                            </ul>
                        </div>

                        <div class="panel-body">

                            <div class="form-group">
                                <label class="col-md-3 col-xs-12 control-label">标题</label>
                                <div class="col-md-6 col-xs-12">
                                    <div class="input-group">
                                        <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                        <input type="hidden"  name="id" th:value="${entity.id}"/>
                                        <input type="text" class="form-control" name="name" th:value="${entity.name}"/>
                                    </div>
                                    <span class="help-block">这里填写标题</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-md-3 col-xs-12 control-label">禁用</label>
                                <div class="col-md-6 col-xs-12">
                                    <select class="form-control select" name="showIndex" >
                                        <option  th:if="${entity}" th:selected="${entity.showIndex=='00'?true:false}" value="00" >启用</option>
                                        <option   th:if="${entity}" th:selected="${entity.showIndex=='01'?true:false}" value="01">禁用</option>
                                    </select>
                                    <span class="help-block">请选择影片地区，必填</span>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-3 col-xs-12 control-label">顺序</label>
                                <div class="col-md-6 col-xs-12">
                                    <div class="input-group">
                                        <span class="input-group-addon"><span
                                                class="fa fa-sort-numeric-asc"></span></span>
                                        <input type="number" class="form-control" required="true" min="0" max="10" th:if="${entity}" th:value="${entity.sort}"/>
                                    </div>
                                    <span class="help-block">这里填写显示顺序</span>
                                </div>
                            </div>
                        </div>
                        <div class="panel-footer">
                            <button class="btn btn-default">重填</button>
                            <button class="btn btn-primary pull-right">提交</button>
                        </div>
                    </div>
                </form>

            </div>
        </div>

    </div>
</div>
</body>
</html>